package mythread.a08threadmethod5.a07threadmethod4;

import mythread.a01threadcase1.MyTread;

public class TreadDemo {
    /*
        public static void join()       插入线程/插队线程
     */
    public static void main(String[] args) throws InterruptedException {
        MyTread t1 = new MyTread();

        t1.setName("飞机");
        t1.start();

        //表示把t1这个线程，插入到当前线程之前
        //t:飞机
        //当前线程：main线程
        t1.join();

        //执行在main线程中的
        for (int i = 0; i < 10; i++) {
            System.out.println("main线程"+i);
        }
    }





}
